//处理火车模块工具js
var TrainTool = (function(){
  var trainTool = {};
  trainTool.errorToIndex = function (vue, tip) {
    vue.$vux.toast.show({
      type: 'cancel',
      type: 'text',
      text: tip || '服务异常',
      onHide(){
        vue.$router.push({
          path: '/train/index'
        });
      }
    });
  };
  return trainTool;
})();
window.$trainTool = TrainTool;
